<?php $this->_extends('_layouts/default_layout'); ?>
 
<?php $this->_block('contents'); ?>

<span>单条电话添加 | <a href="<?php echo url('telephonebook/index'); ?>" >企业通讯录管理</a> | <a href="<?php echo url('telephonebook/addsignaluser'); ?>"> 单个电话添加</a></span>
 
<form action="<?php echo url('user/AddMember'); ?>" method="post" name="mainform" enctype="multipart/form-data" 		

        onsubmit="
		if (this.user_realname.value == '') { 
		    alert('请输入用户真名'); 
		    return false; 
        }
		else { 
            if (this.username.value == '') { 
                alert('请输入用户手机号码'); 
                return false; 
            }
            if (this.username.value.toString().length != 11)
            {
                alert('手机号码长度为11位');
                return false;
            }    
            if (isNaN(this.username.value.toString()))
            {
                alert('用户名必须是手机号码');
                return false;
            }
            if (this.user_work_position.value.toString().length == '')
            {
                alert('请输入用户职位'); 
                return false;
            }


			return true; 
		}"

>
	<table cellpadding="0" cellspacing="0" width="100%">
	<tbody class="">

	<?php   
	?>
	<tr>
		<td><span class="defaultbold">用户真名</span></td>
		<td><input class="input" type="text" value="" name="user_realname" id="10011" size="36" /></td>
	</tr>

	<tr>
		<td><span class="defaultbold">用户手机</span></td>
		<td><input class="input" type="text" value="" name="username" id="10011" size="36" /></td>
	</tr>

	<tr>
		<td><span class="defaultbold">用户职位</span></td>
		<td><input class="input" type="text" value="" name="user_work_position" id="10011" size="36" /></td>
	</tr>

	<tr>
		<td><span class="defaultbold">用户办公室电话</span></td>
		<td><input class="input" type="text" value="" name="user_officetel" id="10011" size="36" /></td>
	</tr>

    <tr>
            <td><span class="defaultbold">用户IMSI号码</span></td>
            <td><input class="input" type="text" value="" onBlur="" name="user_phone_meid" id="10011" size="36" /><span class="tip" name="tip">可以为空</span></td>
    </tr>

    <?php if ($current_user->permission_id == 2): ?>
        <tr>
            <td><span class="defaultbold">用户部门</span><br /></td>
            <td>
                <select name="department_id" >
                    <option value="-1" id="-1" selected="">默认部门
                    <?php foreach ($deps as $col): ?>
                        <option value="<?php echo $col->id() ?>" id="<?php echo $col->id() ?>"><?php echo $col->department_name; ?>
                    </option>
                    <?php endforeach; ?>
                </select>
                <span><a href="<?php echo url('departments/add'); ?>">增加部门</a></span>
            </td>
        </tr>
    <?php endif; ?>

	<tr>
		<input type="hidden" name="addflag" value="1" />
		<input type="hidden" name="checktype" value="4" />

		<td class="tbutton" colspan="6"><input type="submit"  value="提交" class="btn" name="submit">&nbsp;</td>
	</tr>
	</tbody>
	</table>
</form>

<?php $this->_endblock(); ?>